package metrica;

/**
 *
 * @author e235166
 */
public final class DistanciaEuclidea extends DistanciaVectorial {
    @Override
    protected double distanciaVectorial(Double[] a, Double[] b)
    {       
        double total = 0.0;
        
        for(int i = 0; i < a.length; i++)
        {
            double diff = a[i] - b[i];
            total += diff * diff;
        }
        
        return Math.sqrt(total);
    }
}
